home *** CD-ROM | disk | FTP | other *** search
-
- #include "pump.h"
-
- FONT_TFont F1;
-
- PUBLIC void F1Init(void) {
- FONT_Load(&F1, "tnrfont1.fnt");
- }
-
-
- PUBLIC void F1Do1(void) {
- int i, w;
- static char t[] = "PARTY CODING";
- static char t2[] = "RULES";
-
- memset(GL_Pal, 0, 768);
- GL_Pal[15*3+0] = 63;
- GL_Pal[15*3+1] = 63;
- GL_Pal[15*3+2] = 63;
-
- TEXT_GetExtent(&F1, 0, 0, t, &w, 0);
-
- VBL_DumpPalette(GL_Pal, 0, 256);
- i = 0;
- VBL_VSync(0);
- while (!LLK_SpacePressed) {
- if (i > strlen(t))
- break;
- memset(LLS_Screen[0], 0, LLS_Size);
-
- TEXT_Printf(&F1, (320-w)/2, 50, 15, "%.*s", i, t);
-
- LLS_Update();
- {
- byte buf[768];
- int i;
- for (i = 0; i < 256; i++) {
- buf[i*3+0] = 32+rand()%31;
- buf[i*3+1] = 32+rand()%31;
- buf[i*3+2] = 32+rand()%31;
- }
- VBL_DumpPalette(buf, 0, 256);
- VBL_DestPal = GL_Pal;
- VBL_DestRed = VBL_DestGreen = VBL_DestBlue = 0;
- VBL_FadeMode = VBL_FADEFAST;
- VBL_FadeStartColor = 0;
- VBL_FadeNColors = 256;
- VBL_FadePos = 1;
- VBL_FadeSpeed = 8;
- }
- VBL_VSync(20);
- i++;
- }
- TEXT_GetExtent(&F1, 0, 0, t2, &w, 0);
-
- {
- byte buf[768];
- int i;
- for (i = 0; i < 256; i++) {
- buf[i*3+0] = 63;
- buf[i*3+1] = 63;
- buf[i*3+2] = 63;
- }
- VBL_DumpPalette(buf, 0, 256);
- VBL_DestPal = GL_Pal;
- VBL_DestRed = VBL_DestGreen = VBL_DestBlue = 0;
- VBL_FadeMode = VBL_FADEFAST;
- VBL_FadeStartColor = 0;
- VBL_FadeNColors = 256;
- VBL_FadePos = 1;
- VBL_FadeSpeed = 1;
- }
- TEXT_Printf(&F1, (320-w)/2, 130, 15, t2);
- LLS_Update();
- }
-